<center><h1>Voulez vous vraiment supprimer ce magasin ?</h1></center><br /><hr /><br />

<?php
if (isset($_GET['confirm']) AND $_GET['confirm'] == 'yes')
{
	db_del_mag($_GET['del_shop_id']);
	header('Location:index.php?page=magasins&action=show_mag');
}
else if (isset($_GET['confirm']) AND $_GET['confirm'] == 'no')
	header('Location:index.php?page=magasins&action=show_mag');
else
{
	echo "<center><a href='index.php?page=magasins&action=show_mag&del_shop_id=".$_GET['del_shop_id']."&confirm=yes'><img src='img/Tips.png' width='50px' height='50px'/> </a>";
	echo "<a href='index.php?page=magasins&action=show_mag&del_shop_id=".$_GET['del_shop_id']."&confirm=no'><img src='img/Error_1.png' width='50px' height='50px'/> </a></center><br /> <br />";
}
?>

<?php
function db_del_mag($mag_id)
{
	$query = "DELETE FROM magasins WHERE NMAGASIN = ".$mag_id;
	echo $query;
	mysql_query($query)or die(mysql_error());
}

?>